import java.util.*;

public class FireHelper{

  public static String[] watchList = {"n"};
  public static ArrayList<String> baseList = new ArrayList<String>(); 
  public static ArrayList<String> recurseList = new ArrayList<String>(); 
  public static ArrayList<String> paramList = new ArrayList<Stirng>(): 
 
  public static int bell(int n, Node parent){

    Node a = new Node();
    Fire.totalSteps += 2;
    if(parent != null)
    {
      parent.addChild(a);
      a.depth = parent.depth + 1; 
      if(a.depth > Fire.maxDepth)
      {
        Fire.maxDepth = a.depth;
      }
      a.parent = parent;
    }
    else
    {
        root = a;
        a.depth = 0;
        
    }
    
     
      if(n==0 || n==1)
        a.retVal = String.valueOf(1);
      int sum = 0;

      int i = 0;

      while(i<n)
        {
          sum = sum+combinations(n-1,i)*bell(i);

          i = i+1;

        }
      return sum;
     
  }
  
  public static void doRecursive(Object[] params) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException
  {
    Class c = Class.forName("FireHelper");
    Method[] m = c.getDeclaredMethods();
    Object i = c.newInstance();
    
    m[0].invoke(i, params);
    
  }
  
   public static int combinations(int n,int k){
     if(n==0 || n==1)
       a.retVal = String.valueOf(1);if(k==0)
       a.retVal = String.valueOf(1);if(k==n)
       a.retVal = String.valueOf(1);return combinations(n-1,k)+combinations(n-1,k-1);
   }
    
   /**GUI HELPER FUNCTIONS**/
   public static void buildCondLists(){ 
  
    baseList.add("{n == 0 or n == 1} 1");
    recurseList.add("{} sum");
  }
  
  
  public static void buildParamList(){
  
    paramList.add("int");
  
  }
  
  public static void makeLists(){
    buildCondList(); 
    buildParamList(); 
  }
  

  
}